Skip to content

[Fix-17847] Fix incWorkflowInstanceByStateAndWorkflowDefinitionCode not called in version 3.4.0#18082

Merged
ruanwenjun merged 20 commits intoapache:devfrom
SbloodyS:fix_17847
Mar 20, 2026
Merged

[Fix-17847] Fix incWorkflowInstanceByStateAndWorkflowDefinitionCode not called in version 3.4.0#18082
ruanwenjun merged 20 commits intoapache:devfrom
SbloodyS:fix_17847

Conversation

@SbloodyS
Copy link
Member

@SbloodyS SbloodyS commented Mar 19, 2026

Was this PR generated or assisted by AI?

Yes. The test was generated using gpt-5.4.

Purpose of the pull request

fix #17847

Brief change log

  1. Fix warning in CI
Found multiple occurrences of org.json.JSONObject on the class path:
	jar:file:/Users/sbloodys/.m2/repository/com/tdunning/json/1.8/json-1.8.jar!/org/json/JSONObject.class
	jar:file:/Users/sbloodys/.m2/repository/com/vaadin/external/google/android-json/0.0.20131108.vaadin1/android-json-0.0.20131108.vaadin1.jar!/org/json/JSONObject.class

Verify this pull request

This pull request is code cleanup without any test coverage.

(or)

This pull request is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(or)

Pull Request Notice

Pull Request Notice

If your pull request contains incompatible change, you should also add it to docs/docs/en/guide/upgrade/incompatible.md

@SbloodyS SbloodyS added this to the 3.4.2 milestone Mar 19, 2026
@SbloodyS SbloodyS self-assigned this Mar 19, 2026
@SbloodyS SbloodyS requested a review from caishunfeng as a code owner March 19, 2026 02:24
@SbloodyS SbloodyS added the bug Something isn't working label Mar 19, 2026
@SbloodyS SbloodyS requested a review from ruanwenjun as a code owner March 19, 2026 02:24
@github-actions github-actions bot added the test label Mar 19, 2026
ruanwenjun
ruanwenjun previously approved these changes Mar 19, 2026
Copy link
Member

@ruanwenjun ruanwenjun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot added the CI&CD label Mar 20, 2026
@github-actions github-actions bot removed the CI&CD label Mar 20, 2026
Copy link
Member

@ruanwenjun ruanwenjun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can revert the unrelated change of MasterCoordicator

Comment on lines +310 to +313
<exclusion>
<groupId>com.vaadin.external.google</groupId>
<artifactId>android-json</artifactId>
</exclusion>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why change this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wrote it in PR description, and there are some warning in CI.

Comment on lines +90 to +96
final Long workflowDefinitionCode =
serialCommand.getWorkflowDefinitionCode() != null
? serialCommand.getWorkflowDefinitionCode()
: workflowInstance.getWorkflowDefinitionCode();
WorkflowInstanceMetrics.recordWorkflowInstanceFinish(
WorkflowExecutionStatus.STOP,
workflowDefinitionCode);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
final Long workflowDefinitionCode =
serialCommand.getWorkflowDefinitionCode() != null
? serialCommand.getWorkflowDefinitionCode()
: workflowInstance.getWorkflowDefinitionCode();
WorkflowInstanceMetrics.recordWorkflowInstanceFinish(
WorkflowExecutionStatus.STOP,
workflowDefinitionCode);
WorkflowInstanceMetrics.recordWorkflowInstanceFinish(
WorkflowExecutionStatus.STOP,
workflowInstance.getWorkflowDefinitionCode());

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

projectCode: 2102
userId: 1
taskType: LogicFakeTask
taskParams: '{"localParams":null,"varPool":[],"shellScript":"sleep 5"}'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
taskParams: '{"localParams":null,"varPool":[],"shellScript":"sleep 5"}'
taskParams: '{"localParams":null,"varPool":[],"shellScript":"sleep 15"}'

Since the serial coordinator loop interval is 5s, so we need to make sure the task can running longer than 5s, other the discard stragy might not effect.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@SbloodyS SbloodyS requested a review from ruanwenjun March 20, 2026 15:02
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 60%)

See analysis details on SonarQube Cloud

Copy link
Member

@ruanwenjun ruanwenjun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ruanwenjun ruanwenjun merged commit d6c2c46 into apache:dev Mar 20, 2026
118 of 121 checks passed
@SbloodyS SbloodyS deleted the fix_17847 branch March 21, 2026 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend bug Something isn't working test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug][Master] incWorkflowInstanceByStateAndWorkflowDefinitionCode not called in version 3.4.0

2 participants